//
//  BaseModel.m
//  Qyer
//
//  Created by dlios on 15/10/16.
//  Copyright (c) 2015年 GF. All rights reserved.
//

#import "BaseModel.h"

@implementation BaseModel
- (instancetype)initWithDictionary: (NSDictionary *)dictionary{
    if (self = [super init]) {
        [self setValuesForKeysWithDictionary:dictionary];
    }
    return self;
}

+ (instancetype)modelWithDictionary: (NSDictionary *)dictionary{
    
    
    return [[self alloc] initWithDictionary:dictionary];
}

- (void)setValue:(id)value forUndefinedKey:(NSString *)key{
    
    if ([key isEqualToString:@"id"]) {
        self.cid = value;
        
    }
    if ([key isEqualToString:@"description"]) {
        self.cDescription = value;
    }


}
@end
